{extend name="public/base"/}

{block name="body"}

<style>

.mui-table-view-cell p {

    margin-bottom: 0;

    font-size: 12px;

}

.mui-table-view .mui-media-object {

    line-height: 42px;

    width: 60px !important;

        max-width: 60px;

    height: 60px;

}

.mui-card-header {

    font-size: 12px;

    border-radius: 2px 2px 0 0;

        padding: 5px 10px;

}

</style>
<textarea id="foo2"  cols="40" wrap="hard" style="     height: 10px;  margin-left: -1000px;margin-bottom: 0;"  >  
	团购清单 :   {volist name="listyouji" id="vo" key ="k"}     
	订单{$k}-    {$vo['remark']} 
	{$vo['fhremark']} 
	
	 {/volist}     
	      </textarea>
	<textarea id="foo"  cols="40" wrap="hard" style="     height: 10px;  margin-left: -1000px;margin-bottom: 0;"  >  
	团购清单 :   {volist name="listxiaoge" id="vo" key ="k"}     
	订单{$k}-    {$vo['remark']}   
	{$vo['fhremark']} 
	 
	 {/volist}     
	      </textarea>

<header class="mui-bar mui-bar-nav">

  <!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> -->

  <h1 class="mui-title">最新订单</h1>

</header>

<div class="mui-content" style="    margin-bottom: 100px;">
			<div>
			<form method="get">
				<div>
					备注|地址|名字：<input type="text" class="form-control" name="remarkbak" value="{$Think.get.remarkbak}" placeholder="请输入地址/备注/名字">
				
				开始时间：<input type="date" class="form-control" name="start" value="{$Think.get.start}" placeholder="瀵拷婵妞傞梻锟�">
										
						结束时间：<input type="date" class="form-control" name="end" value="{$Think.get.end}" placeholder="缂佹挻娼弮鍫曟？">
											
					<input type="radio" name="buystatus" value="1">已发货
                    <input type="radio" name="buystatus" value="2">未发货
				    <input type="radio" name="buystatus" value="3">全部
				
              
					 <button class="btn btn-primary" type="submit">搜索</button>
				</div>
			
			</form>
		</div>
		<script src="__PUBLIC__/xsd/js/clipboard.min.js"></script>
		     <!--<textarea id="foo2"  style="     height: 10px;  margin-left: -1000px;margin-bottom: 0;"  >
      &#13订单号
    
    </textarea>
		订单复制-->
		 <button class="btn " data-clipboard-target="#foo2" aria-label="复制成功！" style="margin: 0 auto;display: block;">邮寄订单复制</button><br />
		 <button class="btn " data-clipboard-target="#foo" aria-label="复制成功！" style="margin: 0 auto;display: block;">小哥订单复制</button><br />
		   <script>
    //new Clipboard('.btn');
    var clipboard = new Clipboard('.btn');

    clipboard.on('success', function(e) {
    	var msg = e.trigger.getAttribute('aria-label');
      console.log(e);
    	alert(msg);

        e.clearSelection();
    });
    </script>
    
			<div>
	<span>商品总价格({$shopsSum})</span>
           <span>代理价额({$dlpritotalSum})</span>
           
         
          
      </div>

      

  {volist name="list" id="vo"}

    <div class="mui-card">

      	<div class="mui-card-header ">

          <!--<div class="mui-ellipsis mui-col-xs-8">订单编号：{$vo['out_trade_no']}</div>-->
          <div class="mui-ellipsis mui-col-xs-8">订单编号：{$vo['id']}</div>
          <!--小哥单-->
          {if condition="$vo['fhway'] eq 1"}
          <div class="mui-ellipsis mui-col-xs-8" style='color:red'>邮寄订单</div>
          {elseif condition="$vo['fhway'] eq 2"/}
           <div class="mui-ellipsis mui-col-xs-8" style='color:red'>小哥订单</div>
            {elseif condition="$vo['fhway'] eq 3"/}
           <div class="mui-ellipsis mui-col-xs-8" style='color:red'>预定订单</div>
           {/if}
          {eq name="$vo['buystatus']" value='1'}
<!--<div class="mui-col-xs-4 mui-text-right"><a href="{:url('index/order/shipments',array('id'=>$vo['id'],'note'=>1))}" onclick="if(confirm('确定发货?')==false)return false;" class="confirm ajax-get">发货</a></div>-->
<div class="mui-col-xs-4 mui-text-right"><a href="javascript:;" data-toggle="modal" data-target="#myModal2" data-id="{$vo['id']}" >发货</a></div>
{/eq}
 {eq name="$vo['buystatus']" value='3'}
<div class="mui-col-xs-4 mui-text-right" style='color:red'>{$vo['name']}已发货</div>
 {/eq}
          <div class="mui-col-xs-4 mui-text-right"><button  type="button" class="mui-btn qxdd mui-btn-primary mui-btn-outlined" style="font-size:12px;">{$vo['buystatus']|parse_config_value='pay_status'}</button></div>

        </div>

      	<div class="mui-card-content">

      		<div class="mui-card-content-inner" style="    padding: 5px 0;">



            <ul class="mui-table-view mui-table-view-chevron">
   <span><img class="mui-media-object mui-pull-left" src="{$vo['cover_id']|get_cover='path','400x218'}" data-preview-src="" data-preview-group="{$vo['id']}"></span>
   <span><img class="mui-media-object mui-pull-left" src="{$vo['cover_id']|get_cover='path'}"></span>
                <li class="mui-table-view-cell mui-media" onclick='window.location.href = "{:url('index/order/detail',array('id'=>$vo['id']))}"'>

                       
                    <a class="mui-navigate-right">

                        
                        <div class="mui-media-body">

                            <div><strong>¥{$vo['total']}&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp运费：¥{$vo['yunfei']}</br>
                            	配送备注：{$vo['fhremark']}</br>
                            	{if condition="$vo['fh_time'] gt 0"}                            	
                            	发货时间：{$vo['fh_time']|date="Y/m/d H:i",###}
                            	{else /}
                            	发货时间：
                            	{/if}
                            	</strong>
                            </div>

                            <p>下单时间：{$vo['create_time']}</p>

                            <!--<p>收货时间：{$vo['group_time']} {$vo['deliverytime']}-->
                            	
                            </p>
<!--
                            <p>订单类型：

                              {eq name="$vo.index_type" value="1"}

                                  团购

                              {/eq}

                              {eq name="$vo.index_type" value="0"}

                                及时配送

                              {/eq}

                            </p>
-->
                            <p>收货人：{$vo.user_name}   <br /> 
                            	收货地址：{$vo.address}   <br />
                            	微信：{$vo.nick_name}

                            </p>
                             

                           
                            <textarea style="font-size:10px" rows="3">{$vo.remark}</textarea>

                        </div>

                    </a>

                </li>



            </ul>





        	</div>

      </div>

    </div>

  {/volist}

  {$list->muirender()}
 <div class="modal fade "  id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-sm">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
              <h4 class="modal-title" id="myModalLabel">运费详细情况</h4>
            </div>
						<form class="form-horizontal2" action="{:url('index/order/shipmentstest')}" method="post">
	            <div class="modal-body">
	              <div>运费金额：<input type="text" name="yunfei" class="form-control" value="0" style=" width: 60px;text-align: center;" /></div>
								<div>
									<span>运费说明：</span>
									<textarea name="yunfeidetail" class="form-control"></textarea>
								</div>
													<input type="hidden" name="id" value="">
	            </div>
	            <div class="modal-footer">
	              <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	              <button type="submit" class="btn btn-primary submit-btn ajax-post"  target-form="form-horizontal2">确定</button>
	            </div>
						</form>
          </div>
        </div>
      </div>
			<script>
			 $(function(){
				 $('#myModal2').on('show.bs.modal', function (e) {
				 	
						var id = $(e.relatedTarget.outerHTML).attr('data-id');
						$(e.target).find('[name="id"]').val(id);
						
						
				 })
			 })
			</script>

</div>



{/block}

{block name="script"}
<!--
<script type="text/javascript">
	
	   $(function(){
 
    $('.qxdd').on('tap', function(){

    	 var valid =   $("#orderid").val();
    	 var url = $(this).attr('data-url')
     var btnArray = ['鍚�', '鏄�'];
     mui.confirm('鎮ㄧ‘瀹氬凡缁忓彂璐т簡鍚楋紵', '纭畾鍙戣揣', btnArray, function(e) {
       if (e.index == 1) {
           $.post("{:url('index/order/shipments')}", {'id': valid, 'note': 0}, function(data) {
               
               
               if(data.code == 1){
				mui.toast('鍙戣揣鎴愬姛锛�')
               setTimeout(function() {
                 return ;
               }, 2000);
               
			}
			
			
           }, "json");

       } else {
       	mui.toast('鍙戣揣aaaaabbbcc鎴愬姛锛�')
         return ;
       }
     })
     
     
     




    })


    })

	
	
</script>-->

<script>

  mui.init({

    swipeBack:true //启用右滑关闭功能

  });

  $('#scroll').height($(window).height()-44)



</script>
{include file="public/previewimage" /}
{/block}

